package com.example.app_04_activity_launchmode;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class OtherActivity extends AppCompatActivity {

    private static final String TAG = "OtherActivity";

    public OtherActivity() {
        Log.i(TAG, "----> OtherActivity()");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_other);
        Log.i(TAG, "-----> onCreate()");
    }

    /**
     * 按钮点击事件，启动AboutActivity
     * @param view 发生事件的视图对象
     */
    public void startAboutActivity(View view) {
        startActivity(new Intent(this, AboutActivity.class));
    }

    /**
     * 按钮点击事件，启动MainActivity
     * @param view 发生事件的视图对象
     */
    public void startMainActivity(View view) {
        startActivity(new Intent(this, MainActivity.class));
    }
}